/*
* Copyright 2016 YONYOU Corporation Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project         marketing

* @Package         com.yonyou.marketing.message.push.resolver

* @Author          LuZhen

* @FileName        MessageResolver

* @Date            16/11/3

----------------------------------------------------------------------------------
*     Date          Who             Version         Comments
* 1. 16/11/3        LuZhen          1.0             Create Source
*
----------------------------------------------------------------------------------
*/
package com.yonyou.gmmc.service.wechatpush.resolver;

import org.marketing.common.entity.wechatpushmessage.WeChatMessageProtocol;


public interface MessageResolver {

    /**
     * 从MQ获取协议对象
     * @param   protocol            mq消息
     * @return  MessageProtocol     内部待转发消息
     */
    PushMessage receiveMessage(WeChatMessageProtocol protocol);

    /**
     * 对消息进行验证 与具体协议无关，只针对基本内容
     * @param pushMessage   PushMessage
     * @return  true|false
     */
    boolean validateMessage(PushMessage pushMessage);



}
